#ifndef QPIXMAPMEGER_H
#define QPIXMAPMEGER_H

#include <QObject>
#include <QPixmap>

class QLineEdit;
class QTextEdit;
class QPixmapMeger : public QObject
{
    Q_OBJECT
public:
    explicit QPixmapMeger(QObject *parent = nullptr);

    // 合并 两张
    static QPixmap pixmap_merge(const QPixmap& pixmap1, const QPixmap& pixmap2,
                                bool vertical = false, bool right = false);

    // 合并 三张(最后靠右)
    static QPixmap pixmap_merge_v3(const QPixmap& pixmap1, const QPixmap& pixmap2, const QPixmap& pixmap3,
                                    bool vertical = false);

    // 制作 QPixmap
    static QPixmap pixmap_from_textedit(const QTextEdit* textedit);
    static QPixmap pixmap_from_lineedit(const QLineEdit* lineedit);
};

#endif // QPIXMAPMEGER_H
